package com.bloom.spider.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.bloom.spider.mapper.SpiderFieldMapper;
import com.bloom.spider.domain.SpiderField;
import com.bloom.spider.service.ISpiderFieldService;

/**
 * 配置字段Service业务层处理
 * 
 * @author bloom
 * @date 2021-04-28
 */
@Service
public class SpiderFieldServiceImpl implements ISpiderFieldService 
{
    @Autowired
    private SpiderFieldMapper spiderFieldMapper;

    /**
     * 查询配置字段
     * 
     * @param fieldId 配置字段ID
     * @return 配置字段
     */
    @Override
    public SpiderField selectSpiderFieldById(Long fieldId)
    {
        return spiderFieldMapper.selectSpiderFieldById(fieldId);
    }

    /**
     * 查询配置字段列表
     * 
     * @param spiderField 配置字段
     * @return 配置字段
     */
    @Override
    public List<SpiderField> selectSpiderFieldList(SpiderField spiderField)
    {
        return spiderFieldMapper.selectSpiderFieldList(spiderField);
    }

    /**
     * 新增配置字段
     * 
     * @param spiderField 配置字段
     * @return 结果
     */
    @Override
    public int insertSpiderField(SpiderField spiderField)
    {
        return spiderFieldMapper.insertSpiderField(spiderField);
    }

    /**
     * 修改配置字段
     * 
     * @param spiderField 配置字段
     * @return 结果
     */
    @Override
    public int updateSpiderField(SpiderField spiderField)
    {
        return spiderFieldMapper.updateSpiderField(spiderField);
    }

    /**
     * 批量删除配置字段
     * 
     * @param fieldIds 需要删除的配置字段ID
     * @return 结果
     */
    @Override
    public int deleteSpiderFieldByIds(Long[] fieldIds)
    {
        return spiderFieldMapper.deleteSpiderFieldByIds(fieldIds);
    }

    /**
     * 删除配置字段信息
     * 
     * @param fieldId 配置字段ID
     * @return 结果
     */
    @Override
    public int deleteSpiderFieldById(Long fieldId)
    {
        return spiderFieldMapper.deleteSpiderFieldById(fieldId);
    }
}
